Java Loops Are Mainly Polynomial

نویسندگان

  • Maciej Zielenkiewicz
  • Jacek Chrzaszcz
  • Aleksy Schubert
چکیده

Although there exists rare cases where exponential algorithms are used with success, practical software projects mostly consist of polynomial code. We present an automatic analysis tool which divides while-loops in a Java software project into clearly polynomial ones and the rest. The analysis can be useful for example in software quality assurance, maintenance and design of new programming language idioms. After running our tool on two sets of several medium size Java projects we conclude that almost 80% of while-loops are trivially polynomial.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Type-based heap and stack space analysis in Java

A type system is introduced for a strict but expressive subset of Java in order to infer resource upper bounds on both the heap-space and the stack-space requirements of typed programs. This type system is inspired by previous works on Implicit Computational Complexity, using tiering and noninterference techniques. The presented methodology has several advantages. First, it provides explicit po...

متن کامل

Automatic transformation of iterative loops into recursive methods

Context: In software engineering, taking a good election between recursion and iteration is essential because their efficiency and maintenance are different. In fact, developers often need to transform iteration into recursion (e.g., in debugging, to decompose the call graph into iterations); thus, it is quite surprising that there does not exist a public transformation from loops to recursion ...

متن کامل

A Thought on Refactoring Java Loops Using Java 8 Streams

Java 8 has introduced a new abstraction called a stream to represent an immutable sequence of elements and to provide a variety of operations to be executed on the elements in series or in parallel. By processing a collection of data in a declarative way, it enables one to write more concise and clean code that can also leverage multi-core architectures without needing a single line of multithr...

متن کامل

Invariant Generation for Multi-Path Loops with Polynomial Assignments

Program analysis requires the generation of program properties expressing conditions to hold at intermediate program locations. When it comes to programs with loops, these properties are typically expressed as loop invariants. In this paper we study a class of multi-path program loops with numeric variables, in particular nested loops with conditionals, where assignments to program variables ar...

متن کامل

A Java API for polynomial arithmetic

This paper looks at the development of a Java application programming interface (API) for performing unbounded Polynomial Arithmetic. It shows how Java can be used to perform large integer mathematical operations by using the BigInteger class. By demonstrating how the API might be used in a real application the paper shows how easy the API is to use with very little knowledge of polynomial arit...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2015